package edu.ynu.se.xiecheng.achitectureclass.controller;

import edu.ynu.se.xiecheng.achitectureclass.common.controller.LogicController;
import edu.ynu.se.xiecheng.achitectureclass.dao.ShopItemDao;
import edu.ynu.se.xiecheng.achitectureclass.entity.Item;
import edu.ynu.se.xiecheng.achitectureclass.entity.ShopItem;
import edu.ynu.se.xiecheng.achitectureclass.entity.ShopItem;
import edu.ynu.se.xiecheng.achitectureclass.service.ShopItemService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags = "shopItem实体的控制器")
@RestController
@RequestMapping("/shopItem")
public class ShopItemController extends LogicController<ShopItemService, ShopItemDao,ShopItem,Long> {
    public ShopItemController(@Autowired ShopItemService ss){
        super(ss);
    }
    @ApiOperation("查找相应价格")
    @GetMapping("/getPrice/{shopId}/{itemId}")
    public Double getPrice(@PathVariable Long shopId, @PathVariable Long itemId ){
        return getService().getPrice(shopId,itemId);
    }

}
